<link rel="stylesheet" href="../addons/jy_sns/custom/templates/mobile/images/common.css" />
<style>
body{
background:#fff
}
.fui-page, .fui-page-group{
background:#fff
}
.fui-content{
background:#fff
}
.fui-card-content img{max-width:100%}
</style>
<div class='fui-page  fui-page-current'>
	<div class='fui-content'>
		<div id="carousel-container" style="padding:0 0.5rem" class="carousel slide" data-role="carousel" data-param-auto="true">
		<div class="carousel-inner" role="listbox" style="height:8.3rem">
		<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.advs" style="height:8.3rem">
			<a href="{{item.url}}">
				<img ng-src="{{tomedia(item.image) || '../core/resource/images/banner-1.jpg'}}" style="display: block;width:100%; height: 100%;margin: 0 auto;">
			</a>
		</div>
		</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
				<div class="fui-swipe-bullet" ng-repeat="item in pagedata.advs" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
		</div>
			
			<div  ng-if="pagedata.categorycount>0" class="fui-icon-group noborder circle" style="margin-top:20px;">			
					<a ng-repeat="cate in pagedata.category" ng-click="access_json(cate.url)">
						<div class="fui-icon-col">
							<div class="icon"><img ng-src="{{tomedia(cate.image)}}"/></div>
							<div class="text">{{cate.name}}</div>
						</div>
					</a>				
			</div>
		<div class="fui-cell-group qa-title" style="margin-top:0">
			<div class="fui-cell">
				<div class="fui-cell-text">推荐版块</div>
				<a class="fui-cell-remark external" ng-click="access_json('/board.lists/')" >全部</a>
			</div>
		</div>
		<div class="fui-list-group" style="margin-top:0;">			
			<a ng-repeat="value in pagedata.recommands" class="fui-list external" ng-click="access_json('/board.index//id='+value.id)" >
				<div class="fui-list-media">
					<img ng-src="{{tomedia(value.logo)}}" class="round">
				</div>
				<div class="fui-list-inner">
					<div class="row">
						<div class="row-text">{{value.title}}</div>
						<div class="angle" style="width:13px"></div>
					</div>
					<div class='text'>话题数: <span class='text-danger'>{{value.postcount}}</span> 关注数:<span class="text-danger">{{value.followcount}}</span></div>
					<div class="text">{{value.desc}}</div>
				</div>
			</a>			
		</div>
     	<div class="fui-tab-scroll" style="margin-top:0.4rem;">
				<div ng-class="{'item':1,'on':pagedata.params.order=='tuijie'}" style="height:2rem;line-height:2rem"><a href="javascript:;" ng-click="pagedata.params.order='tuijie';pagedata.getlist();">推荐</a></div>
				<div ng-class="{'item':1,'on':pagedata.params.order=='new'}" style="height:2rem;line-height:2rem"><a href="javascript:;" ng-click="pagedata.params.order='new';pagedata.getlist();">最新</a></div>
		</div>
		<div ng-include="sys_html('_list')"></div>
	</div>
</div>
<div ng-include="sys_html('_menu')"></div>
<script>
require(['bootstrap', 'hammer'], function($, Hammer){
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
	});
scope.pagedata.getlist=function(){
	scope.tool.get_list('jy_sns/index/getlist/',true);
}
scope.pagedata.getlist();
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_sns/index/getlist/');
}
</script>